package com.team12.hotel404.service.serviceImpl;

import com.team12.hotel404.domain.Hotel;
import com.team12.hotel404.domain.collect;
import com.team12.hotel404.mapper.collectMapper;
import com.team12.hotel404.service.CollectService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class CollectServiceImpl implements CollectService {
    @Autowired
    private collectMapper collectMappers;

    @Override
    public int createCollection(collect collects) {
        return collectMappers.insert(collects);
    }

    @Override
    public List<Hotel> findCollection(Integer userId) {
        return collectMappers.selectHotel(userId);
    }

    @Override
    public int delete(Integer id) {
        return collectMappers.deleteCollectionByHotelId(id);
    }
}
